import { defineStore } from "pinia"

type MenuState = {
  menuTree: MenuTreeResponse[]
}

const useMenuStore = defineStore("menu", {
  state: (): MenuState => ({
    menuTree: []
  }),
  actions: {
    setMenuTreeAction(newMenuTree: MenuTreeResponse[]) {
      this.menuTree = newMenuTree
    }
  }
})

export default useMenuStore
